define(function(require, exports, module){
	var IndexView = require("../view/index");
	var SmartgroupView = require("../view/smartgroup");
	var myOrderView = require("../view/myorder");
	var voucherCenterView = require("../view/vouchercenter");
	var ServicehallView = require("../view/servicehall");
	var IcloudlectureView = require("../view/cloudlecture");
	var PersonalCenterView = require("../view/personalcenter");
	var EventdetailsView = require("../view/eventdetails");
    var ThinktankdetailsView = require("../view/thinktankdetails");
    var MycollectsView = require("../view/mycollects");
    var MycollectdetailView = require("../view/mycollectdetail");
    var CloudProcurementView = require("../view/cloudprocurement");
    var MDMView = require("../view/MDM");
    var MyFocusView = require("../view/myfocus");
    var productServiceView = require("../view/productService");
    var CertifiedEnterpriseView = require("../view/certifiedEnterprise");
    var cloudProjectView = require("../view/cloudProject");
    var cloudProjectDetailView = require("../view/cloudProjectDetail");
    var PayMethodView = require("../view/payMethod");
    var SearchView = require("../view/search");
    /*地图路由*/
    var mapView = require("../view/map");

    /*头部配置页*/
    var setView = require("../view/set");


	module.exports = Nuui.Controller.extend({
		actions: {
			"index": "toIndex",
			"smartgroup": "toSmartgroup",
			"myorder": "toMyOrder",
			"vouchercenter": "toVoucherCenter",
			"servicehall": "toServicehall",
			"cloudlecture": "toIcloudlecture",
			"personalcenter" : "PersonalCenter",
			"eventdetails":"toEventdetails",
			"thinktankdetails":"toThinktankdetails",
            "mycollects":"toMycollects",
            "mycollectdetail":"toMycollectdetail",
			"myfocus":"toMyfocus",
			"cloudprocurement": "toCloudprocurement",
            "productService":"toProductService",
			"MDM": "toMDM",
            "set":"toSet",
            "map":"toMap",
            "certifiedEnterprise":"toCertifiedEnterprise",
            "cloudProject":"toCloudProject",
            "cloudProjectDetail":"toCloudProjectDetail",
            "payMethod":"toPayMethod",
            'search':'toSearch'
		},
		toIndex: function(){
			App.header.reset({
				title: "<header id=\"homepage2-header\">\n" +
                "\t\t<div class=\"center\"></div>\n" +
                "\t\t<input type=\"text\" class=\"search\" placeholder=\"企业、服务、专家\"/>\n" +
                "\t\t<a class=\"fang\">\n" +
                "\t\t\t<img src=\"images/img/fangfajing.png\"/>\n" +
                "\t\t</a>\n" +
                "\t</header>",
                leftButtonContent: "@cate"
			});
			App.footer.reset(1);   //渲染页面是不是要加底部
			App.container.show(new IndexView());
		},
        toSearch: function(){
            App.header.reset({
                title:"<ul class=\"search-tab\">\n" +
                "\t\t<li class=\"item f_left active\">服务</li>\n" +
                "\t\t<li class=\"item f_left\">活动</li>\n" +
                "\t\t<li class=\"item f_left\">专家</li>\n" +
                "\t\t\t<li class=\"item f_left\">企业</li>\n" +
                "\t\t</ul>" ,
                leftButtonContent: "@back"
            });
            App.footer.reset(0);
            App.container.show(new SearchView());
        },
        toPayMethod: function(){
            App.header.reset({
                title: "支付",
                leftButtonContent: "@back1"
            });
            App.footer.reset(0);
            App.container.show(new PayMethodView());
        },
        toIcloudlecture: function(){
            App.header.reset({
                title: "云讲座",
                rightButtonContent: "@select"
            });
            App.footer.reset(2);
            App.container.show(new IcloudlectureView());
        },
        toCloudprocurement: function(){
            App.header.reset({
                title: "云采购",
                leftButtonContent: "@back",
                rightButtonContent: "@select"
            });
            App.footer.reset(0);
            App.container.show(new CloudProcurementView());
        },
        toMDM: function(){
            App.header.reset({
                title: "活动详情",
                leftButtonContent: "@back3",
                rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new MDMView());
        },
        toServicehall: function(){
            App.header.reset({
                title: "服务大厅"
                //rightButtonContent: "@select"
                //leftButtonContent: "@back"
            });
            App.footer.reset(3);
            App.container.show(new ServicehallView());
        },
        toSmartgroup: function(){
			App.header.reset({
				title: "智慧团",
                rightButtonContent: "@select"
			});
			App.footer.reset(4);
			App.container.show(new SmartgroupView());
		},
		toMyfocus: function(){
			App.header.reset({
				title: "我的关注",                
				leftButtonContent: "@back1"
			});
			App.footer.reset(0);
			App.container.show(new MyFocusView());
		},
		toCertifiedEnterprise: function(){
			App.header.reset({
				title: "认证企业",                
				leftButtonContent: "@back5"
			});
			App.footer.reset(0);
			App.container.show(new CertifiedEnterpriseView());
		},
		toPartnersDetail: function(){
			App.header.reset({
				title: "伙伴详情",
				leftButtonContent: "@back"
			});
			App.footer.reset(0);
			App.container.show(new PartnersDetailView());
		},
		toMyOrder: function(){
			App.header.reset({
				title: "我的订单",
				leftButtonContent: "@back1"
			});
			App.footer.reset(0);
			App.container.show(new myOrderView());
		},
		toVoucherCenter: function(){
			App.header.reset({
				title: "充值中心",
                leftButtonContent: "@back1"
			});
			App.footer.reset(0);
			App.container.show(new voucherCenterView());
		},
        PersonalCenter : function(){
			App.header.reset({
				//title: "个人中心"
				leftButtonContent: "wode",
                rightButtonContent: "@set"
			});
			App.footer.reset(5);
			App.container.show(new PersonalCenterView());
		
		},
        toEventdetails : function () {
            App.header.reset({
                title: "活动详情",
                leftButtonContent: "@back2",
                rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new EventdetailsView());
        },
        toThinktankdetails : function () {
            App.header.reset({
                //title: "智能团详情",
                leftButtonContent: "@back"
                //rightButtonContent: "@select"
            });
            App.footer.reset(0);
            App.container.show(new ThinktankdetailsView());
        },
        toMycollects : function () {
            App.header.reset({
                title: "我的收藏",
                leftButtonContent: "@back1"
            });
            App.footer.reset(0);
            App.container.show(new MycollectsView());
        },
        toMycollectdetail : function () {
            App.header.reset({
               // title: "我的收藏",
                leftButtonContent: "@back",
                rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new MycollectdetailView());
        },
        toProductService:function () {
            App.header.reset({
                title: "伙伴详情",
                leftButtonContent: "@back"
                //rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new productServiceView());
        },
        toSet:function () {
            App.header.reset({
                title: "设置",
                leftButtonContent: "@back"
                //rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new setView());
        },
        toMap:function () {
            App.header.reset({
                title: "地图",
                leftButtonContent: "@back"
                //rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new mapView());
        },
        toCloudProject:function () {
            App.header.reset({
                title: "云项目",
                leftButtonContent: "@back5",
                rightButtonContent: "@select"
            });
            App.footer.reset(0);
            App.container.show(new cloudProjectView());
        },
        toCloudProjectDetail:function () {
            App.header.reset({
                title: "详情",
                leftButtonContent: "@back6",
                rightButtonContent: "@share"
            });
            App.footer.reset(0);
            App.container.show(new cloudProjectDetailView());
        }
	});
	
});